package org.tc.product.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import org.tc.product.entity.Pictures;
import org.tc.product.mapper.PicturesMapper;
import org.tc.product.service.PicturesService;

import java.util.List;

@Service
@RestController
public class PicturesServiceImpl implements PicturesService {

    @Autowired
    private PicturesMapper picturesMapper;

    @Override
    public int insertPic(@RequestBody Pictures record) {
        int count = picturesMapper.insert(record);
        return count;
    }

    @Override
    public List<Pictures> getPic(@RequestBody Pictures pictures) {
        List<Pictures> pic = picturesMapper.getPic(pictures);
        return pic;
    }

    @Override
    public int updPic(@RequestBody Pictures record) {
        int count = picturesMapper.updPic(record);
        return count;
    }
}
